package spynx.util;

public class InvalidOperation extends RuntimeException {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public InvalidOperation(String operator, Object o1, Object o2) {
		super(String.format("Operator '%s' is not applicable between '%s' and '%s'", operator,
				o1 != null ? o1.getClass().getName() : "null", o2 != null ? o2.getClass().getName() : "null"));
	}
	
	public InvalidOperation(String operator, Object o1) {
		super(String.format("Operator '%s' is not applicable for '%s", operator,
				o1 != null ? o1.getClass().getName() :  "null"));
	}
}
